package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysMonitor;
import com.ruoyi.common.core.domain.entity.SysMonitorType;
import com.ruoyi.common.pojo.AddSysMonitorReq;
import com.ruoyi.common.pojo.UpdateMonitorDeviceReq;
import com.ruoyi.system.service.SysMonitorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "固定点模块")
@RestController
@RequestMapping("/system/monitor")
public class SysMonitorController {

    @Autowired
    private SysMonitorService sysMonitorService;


    @ApiOperation("添加固定点信息")
    @PostMapping("/addmonitor")
    public AjaxResult addMonitor(@RequestBody AddSysMonitorReq params) {
        return sysMonitorService.addMonitor(params);
    }

    @ApiOperation("查询固定点列表")
    @PostMapping("/queryMonitor")
    public AjaxResult queryMonitor(@RequestBody SysMonitor params) {
        return sysMonitorService.queryMonitor(params);
    }

    @ApiOperation("删除固定点信息")
    @PostMapping("/deleteMonitor")
    public AjaxResult deleteMonitor(@RequestBody SysMonitor params) {
        return sysMonitorService.deleteMonitor(params);
    }

    @ApiOperation("修改固定点信息")
    @PostMapping("/updateMonitor")
    public AjaxResult updateMonitor(@RequestBody SysMonitor params) {
        return sysMonitorService.updateMonitor(params);
    }

    @ApiOperation("查询固定点设备")
    @PostMapping("/queryMonitorDevice")
    public AjaxResult queryMonitorDevice(@RequestBody SysMonitor params) {
        return sysMonitorService.queryMonitorDevice(params);
    }

    @ApiOperation("添加固定点设备")
    @PostMapping("/addMonitorDevice")
    public AjaxResult addMonitorDevice(@RequestBody UpdateMonitorDeviceReq params) {
        return sysMonitorService.addMonitorDevice(params);
    }

    @ApiOperation("删除固定点设备")
    @PostMapping("/deleteMonitorDevice")
    public AjaxResult deleteMonitorDevice(@RequestBody UpdateMonitorDeviceReq params) {
        return sysMonitorService.deleteMonitorDevice(params);
    }

    @ApiOperation("查询固定点设备列表")
    @PostMapping("/queryDevice")
    public AjaxResult queryDevice(@RequestBody UpdateMonitorDeviceReq params) {
        return sysMonitorService.queryDevice(params);
    }

    @ApiOperation("查询固定点类型列表")
    @PostMapping("/MonitorType")
    public AjaxResult queryMonitorType(@RequestBody SysMonitorType params) {
        return sysMonitorService.queryMonitorType(params);
    }

    @ApiOperation("删除固定点类型")
    @PostMapping("/deleteMonitorType")
    public AjaxResult deleteMonitorType(@RequestBody SysMonitorType params) {
        return sysMonitorService.deleteMonitorType(params);
    }

    @ApiOperation("添加固定点类型")
    @PostMapping("/addMonitorType")
    public AjaxResult addMonitorType(@RequestBody SysMonitorType params) {
        return sysMonitorService.addMonitorType(params);
    }



}
